home *** CD-ROM | disk | FTP | other *** search
- Path: deepthought.de!holger
- From: holger@deep.hb.provi.de (Holger Bruns)
- Newsgroups: comp.sys.cbm,comp.os.misc,alt.comp.hardware.homebuilt,comp.sys.apple2,comp.sys.apple2.programmer,comp.sys.atari.8bit
- Subject: Re: 6502 Multitasking OS announce
- Date: Mon, 25 Mar 1996 07:02:41
- Organization: freelance writer
- Message-ID: <holger.979.00070BB3@deep.hb.provi.de>
- References: <4i94fs$stj@narses.hrz.tu-chemnitz.de> <holger.948.00030EE6@deep.hb.provi.de> <4ijtbe$7ca@no-names.nerdc.ufl.edu> <4ijuic$iiq@gatekeeper.liffe.com> <4innc7$hc4@no-names.nerdc.ufl.edu> <4itkri$qlc@seagoon.newcastle.edu.au>
- NNTP-Posting-Host: 193.101.45.22
- X-Newsreader: Trumpet for Windows [Version 1.0 Rev A]
-
- In article <4j58eh$btc@saluki-news.wham.siu.edu> <agent@siu.edu> writes:
-
- >How about this idea, to handle stacks? I read a similar thing in an
- >issue of Dr. Dobbs Journal, in an article about a small multitasker.
-
- >Given that the stack is mostly going to be used for minor parameter
- >passing and jsr's. I think is a good assumption -- other data
- >structures are better suited for larger jobs.
-
- >Instead of copying the stack to and fro on every task switch, how about
- >subdividing it? Each task would be allocated a portion of the stack. A
- >task switch moves between the portions by adding or subtracting numbers
- >from the stack register.
-
- I guess, it will not work. The tasks cannot be executed independently. Only
- the task on top of the stack will work without causing errors. Assume the
- parameters of task 1 have been pushed to the top of the stack. The parameters
- of task 2 are below of them. Now you try to execute task 2. Your stack
- register will point to the bottom of the parameters of task 1. Pushing any
- data to the stack will overwrite the parameters of task 1. Assume your
- system decides to execute task 1 after executing task 2. Since the parameters
- of task 1 are corrupted in this case, the system will crash.
-
- Holger
-
-